package com.example.neusoft.yuejian_12.Service;

import com.example.neusoft.yuejian_12.JavaBean.Photo;
import com.example.neusoft.yuejian_12.JavaBean.PhotoComment;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by 晓真 on 2017/9/30.
 */

public interface PhotoService {
    @GET("/workout/api.php/lists/mod/shaitu/related/1")
    Call<List<Photo>> photolist(
    );

    //http://172.24.10.175/workout/api.php/slists/mod/shaitu/related/1/id/175
    @GET("/workout/api.php/get/mod/shaitu/related/1")
    Call<Photo> getPhotoById(
                @Query("id") String id
    );

    //晒图评论
    @GET("/workout/api.php/create/mod/shaireply/SessionID/lgj98rfkiqvenhrk2o7oe2po81")
    Call<Integer> insertComment(
            @Query("shaitu_id") String shaitu_id,
            @Query("userid") String userid,
            @Query("reply_userid") String reply_userid,
            @Query("reply") String reply
    );

    //发布晒图ResponseBody
    @Multipart
    @POST("/workout/api.php/fcreate/mod/shaitu/userid/{userid}/title/{title}")
    Call<ResponseBody> signpic(
            @Path("userid") String uid,
            @Path("title") String title,
            @Part MultipartBody.Part file
    );

}
